package com.elai.operate.service.impl;

import java.util.List;
import com.elai.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.elai.operate.mapper.OperateChannelConfigMapper;
import com.elai.operate.domain.OperateChannelConfig;
import com.elai.operate.service.IOperateChannelConfigService;

/**
 * 推送通道管理Service业务层处理
 * 
 * @author elai
 * @date 2021-10-18
 */
@Service
public class OperateChannelConfigServiceImpl implements IOperateChannelConfigService 
{
    @Autowired
    private OperateChannelConfigMapper operateChannelConfigMapper;

    /**
     * 查询推送通道管理
     * 
     * @param id 推送通道管理ID
     * @return 推送通道管理
     */
    @Override
    public OperateChannelConfig selectOperateChannelConfigById(Integer id)
    {
        return operateChannelConfigMapper.selectOperateChannelConfigById(id);
    }

    /**
     * 查询推送通道管理列表
     * 
     * @param operateChannelConfig 推送通道管理
     * @return 推送通道管理
     */
    @Override
    public List<OperateChannelConfig> selectOperateChannelConfigList(OperateChannelConfig operateChannelConfig)
    {
        return operateChannelConfigMapper.selectOperateChannelConfigList(operateChannelConfig);
    }

    /**
     * 新增推送通道管理
     * 
     * @param operateChannelConfig 推送通道管理
     * @return 结果
     */
    @Override
    public int insertOperateChannelConfig(OperateChannelConfig operateChannelConfig)
    {
        operateChannelConfig.setCreateTime(DateUtils.getNowDate());
        return operateChannelConfigMapper.insertOperateChannelConfig(operateChannelConfig);
    }

    /**
     * 修改推送通道管理
     * 
     * @param operateChannelConfig 推送通道管理
     * @return 结果
     */
    @Override
    public int updateOperateChannelConfig(OperateChannelConfig operateChannelConfig)
    {
        operateChannelConfig.setUpdateTime(DateUtils.getNowDate());
        return operateChannelConfigMapper.updateOperateChannelConfig(operateChannelConfig);
    }

    /**
     * 批量删除推送通道管理
     * 
     * @param ids 需要删除的推送通道管理ID
     * @return 结果
     */
    @Override
    public int deleteOperateChannelConfigByIds(Integer[] ids)
    {
        return operateChannelConfigMapper.deleteOperateChannelConfigByIds(ids);
    }

    /**
     * 删除推送通道管理信息
     * 
     * @param id 推送通道管理ID
     * @return 结果
     */
    @Override
    public int deleteOperateChannelConfigById(Integer id)
    {
        return operateChannelConfigMapper.deleteOperateChannelConfigById(id);
    }
}
